package com.bmft;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.TextView;

import com.bmft.grid_view11.GridViewActivity11;
import com.bmft.list_view10.ListViewActivity10;
import com.bmft.recycler_view16.RecyclerViewActivity16;

/**
 * 这里的 manifests.xml 需要放到和java ，res 同级目录下.
 */
public class MainActivity extends AppCompatActivity {
    private TextView  btn01;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        //这里的 set contentView 可以设置启动代表的页面.
        setContentView(R.layout.activity_main);
        //获得这个btn 01
        btn01 = findViewById(R.id.main_to_text_view_btn);
        //设置跳转的界面
        btn01.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                //利用反射，实现页面的跳转
                Intent intent = new Intent(MainActivity.this, TextViewActivity03.class);
                //这里可以传入一个数组是什么鬼？？不是吧是组合，还是什么？
                startActivity(intent);
            }
        });
    }

    /**
     * main 跳转到 button 04 页面。
     * 第一种绑定方式，layout绑定方式实现onclick()，不常用。
     * @param view
     */
    public void pageJumpToButton04(View view) {
        Intent intent = new Intent(MainActivity.this, ButtonActivity04.class);
        startActivity(intent);
    }

    /**
     * -跳转到edit text 5的登录界面
     * @param view
     */
    public void pageJumpToEditText05(View view) {
        Intent intent = new Intent(MainActivity.this, EditTextActivity05.class);
        startActivity(intent);
    }

    /**
     * jump to image view 06
     * @param view
     */
    public void jumpToImageView06(View view) {
        Intent intent = new Intent(MainActivity.this, ImageViewActivity06.class);
        startActivity(intent);
    }

    public void jumpToRadioButton(View view) {
        Intent intent = new Intent(MainActivity.this, RadioButtonActivity07.class);
        startActivity(intent);
    }

    public void jumpToCheckBox(View view) {
        Intent intent = new Intent(MainActivity.this, CheckBoxActivity08.class);
        startActivity(intent);
    }

    public void jumpToImageView08(View view) {
        Intent intent = new Intent(MainActivity.this, ImageViewActivity09.class);
        startActivity(intent);
    }

    public void jumpToListView10(View view) {
        Intent intent = new Intent(MainActivity.this, ListViewActivity10.class);
        startActivity(intent);

    }

    public void jumpToGridView11(View view) {
        Intent intent = new Intent(MainActivity.this, GridViewActivity11.class);
        startActivity(intent);
    }

    public void ToProcessBar(View view) {
        Intent intent = new Intent(MainActivity.this, ProcessBarActivity13.class);
        startActivity(intent);
    }

    public void toAlertDialog(View view) {
        Intent intent = new Intent(MainActivity.this, AlertDialogActivity14.class);
        startActivity(intent);
    }

    public void toProgressDialog(View view) {
        Intent intent = new Intent(MainActivity.this, ProgressDialogActivity15.class);
        startActivity(intent);
    }


    public void toRecyclerView16(View view) {
        Intent intent = new Intent(MainActivity.this, RecyclerViewActivity16.class);
        startActivity(intent);
    }
}